package com.sch.hospital.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sch.hospital.Mapper.FamilymemberMapper;
import com.sch.hospital.domain.Familymember;
import com.sch.hospital.service.IFamilymemberService;

/**
 * 患者家庭成员Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-30
 */
@Service
public class FamilymemberServiceImpl implements IFamilymemberService 
{
    @Autowired
    private FamilymemberMapper familymemberMapper;

    /**
     * 查询患者家庭成员
     * 
     * @param id 患者家庭成员主键
     * @return 患者家庭成员
     */
    @Override
    public Familymember selectFamilymemberById(Long id)
    {
        return familymemberMapper.selectFamilymemberById(id);
    }

    /**
     * 查询患者家庭成员列表
     * 
     * @param familymember 患者家庭成员
     * @return 患者家庭成员
     */
    @Override
    public List<Familymember> selectFamilymemberList(Familymember familymember)
    {
        return familymemberMapper.selectFamilymemberList(familymember);
    }

    /**
     * 新增患者家庭成员
     * 
     * @param familymember 患者家庭成员
     * @return 结果
     */
    @Override
    public int insertFamilymember(Familymember familymember)
    {
        return familymemberMapper.insertFamilymember(familymember);
    }

    /**
     * 修改患者家庭成员
     * 
     * @param familymember 患者家庭成员
     * @return 结果
     */
    @Override
    public int updateFamilymember(Familymember familymember)
    {
        return familymemberMapper.updateFamilymember(familymember);
    }

    /**
     * 批量删除患者家庭成员
     * 
     * @param ids 需要删除的患者家庭成员主键
     * @return 结果
     */
    @Override
    public int deleteFamilymemberByIds(Long[] ids)
    {
        return familymemberMapper.deleteFamilymemberByIds(ids);
    }

    /**
     * 删除患者家庭成员信息
     * 
     * @param id 患者家庭成员主键
     * @return 结果
     */
    @Override
    public int deleteFamilymemberById(Long id)
    {
        return familymemberMapper.deleteFamilymemberById(id);
    }
}
